package br.com.onlinebidding.dao;

import java.util.HashMap;
import java.util.Map;

import br.com.onlinebidding.model.Bid;

public class BidDAO extends GenericDAO<Bid> {

	private static final long serialVersionUID = -5542154295607427773L;

	public BidDAO() {super(Bid.class);}
	
	public Bid findBidByNameEdict(String idEdict) {
		Map<String, Object> parameters = new HashMap<String, Object>();
		parameters.put("idEdict", idEdict);
		return super.findOneResult (Bid.FIND_BY_EDICT, parameters);
	}

	public Bid findBidByDateTimeOffer(String dateTimeOffer) {
		Map<String, Object> parameters = new HashMap<String, Object>();
		parameters.put("dateTimeOffer", dateTimeOffer);
		return super.findOneResult(Bid.FIND_BY_DATETIMEOFFER, parameters);
	}
	
}
